package com.example.demo.Dto;

import com.example.demo.Enum.UserStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CreateProductDto {


    @NotEmpty
    private String name;


    @NotEmpty
    private String description;

    @NotNull
    @DecimalMin(value = "0.0", inclusive = false)
    @JsonFormat(shape = JsonFormat.Shape.NUMBER_FLOAT)
    private Float price;

    @Min(0)
    private Integer stock = 0;

    @NotEmpty
    private String merchantName;

    @NotEmpty
    private List<String> categories;

    private UserStatusEnum status;
}
